jun.BotolDetilGrid = Ext.extend(Ext.grid.GridPanel, {
			title : "BotolDetil",
			id : 'docs-jun.BotolDetilGrid',
			iconCls : "silk-grid",
			viewConfig : {
				forceFit : true
			},
			sm : new Ext.grid.RowSelectionModel({
						singleSelect : true
					}),
			columns : [{
						header : 'Jenis Botol',
						resizable : true,
						dataIndex : 'jenis_botol_id',
						width : 150,
						renderer : jun.renderJenisBotol
					}, {
						header : 'JML',
						resizable : true,
						dataIndex : 'jml',
						width : 75,
						align : "right",
						renderer : Ext.util.Format.numberRenderer("0,0")
					}, {
						header : 'Harga',
						resizable : true,
						dataIndex : 'price',
						width : 75,
						align : "right",
						renderer : Ext.util.Format.numberRenderer("0,0")
					}, {
						header : 'Total',
						resizable : true,
						dataIndex : 'total',
						width : 75,
						align : "right",
						renderer : Ext.util.Format.numberRenderer("0,0")
					}],
			initComponent : function() {
				this.store = jun.rztBotolDetil;
				this.tbar = {
					xtype : 'toolbar',
					items : [{
								xtype : 'button',
								text : 'Tambah Item',
								ref : '../btnAdd'
							}, {
								xtype : 'tbseparator'
							}, {
								xtype : 'button',
								text : 'Hapus Item',
								ref : '../btnDelete'
							}]
				};
				jun.BotolDetilGrid.superclass.initComponent.call(this);
				this.btnAdd.on('Click', this.loadForm, this);
				this.btnDelete.on('Click', this.deleteRec, this);
				this.getSelectionModel().on('rowselect', this.getrow, this);
			},
			getrow : function(sm, idx, r) {
				this.record = r;

				var selectedz = this.sm.getSelections();
			},
			loadForm : function() {
				var form = new jun.BotolDetilWin({
							modez : 0
						});
				form.show();
			},
			deleteRec : function() {
				Ext.MessageBox.confirm('Pertanyaan',
						'Apakah anda yakin ingin menghapus data ini?',
						this.deleteRecYes, this);
			},
			deleteRecYes : function(btn) {

				if (btn == 'no') {
					return;
				}

				var record = this.sm.getSelected();

				// Check is list selected
				if (record == "") {
					Ext.MessageBox.alert("Warning", "Anda Belum Memilih Data");
					return;
				}

				this.store.remove(record), this.store.refreshData();
			}
		})
